//
//  HMSetModel.m
//  HowToDo
//
//  Created by 李贺 on 2017/1/4.
//  Copyright © 2017年 KY. All rights reserved.
//

#import "HMSetModel.h"

@implementation HMSetModel

+ (instancetype)makeModelWithDict:(NSDictionary *)dict{
    id model = [[self alloc] init];
    [model setValuesForKeysWithDictionary:dict];
    return model;
}


#pragma mark - 加载数据
+ (NSArray *)loadSetMenuData {

    NSArray *array = [NSArray arrayWithContentsOfURL:[[NSBundle mainBundle] URLForResource:@"SetPlistList.plist" withExtension:nil]];

    NSMutableArray *arrayM = [NSMutableArray arrayWithCapacity:array.count];

    [array enumerateObjectsUsingBlock:^(id  _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
        HMSetModel * model = [HMSetModel makeModelWithDict:obj];
        [arrayM addObject:model];
    }];
    return arrayM.copy;
}


@end
